package com.ssy.lingxi.order.model.vo.platform.request;

import com.ssy.lingxi.order.model.vo.basic.request.OrderMemberIdAndRoleIdVO;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * 平台后台 - 新增交易、采购流程规则接口参数
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-24
 */
public class PlatformProcessVO implements Serializable {
    private static final long serialVersionUID = 7288726668221838600L;

    /**
     * 规则名称
     */
    @NotBlank(message = "流程规则名称不能为空")
    @Size(max = 50, message = "流程规则名称最长50个字符")
    private String name;

    /**
     * 基础流程Id
     */
    @NotNull(message = "基础流程Id要大于0")
    @Positive(message = "基础流程Id要大于0")
    private Long baseProcessId;

    /**
     * 是否适用所有会员，true-是，false-否
     */
    @NotNull(message = "是否适用所有会员属性不能为空")
    private Boolean allMembers;

    /**
     * 适用会员列表，如不适用所有商品不能为空
     */
    @Valid
    private List<OrderMemberIdAndRoleIdVO> members;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getBaseProcessId() {
        return baseProcessId;
    }

    public void setBaseProcessId(Long baseProcessId) {
        this.baseProcessId = baseProcessId;
    }

    public Boolean getAllMembers() {
        return allMembers;
    }

    public void setAllMembers(Boolean allMembers) {
        this.allMembers = allMembers;
    }

    public List<OrderMemberIdAndRoleIdVO> getMembers() {
        return members;
    }

    public void setMembers(List<OrderMemberIdAndRoleIdVO> members) {
        this.members = members;
    }
}
